package com.foreverwin.jzymes.eap.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.eap.mapper.ResourceTimeLogMapper;
import com.foreverwin.jzymes.eap.domain.ResourceTimeLog;
import com.foreverwin.jzymes.eap.service.IResourceTimeLogService;

/**
 * 设备运行记录 服务层实现
 * 
 * @author ervin
 * @date 2019-06-22
 */
@Service
public class ResourceTimeLogServiceImpl implements IResourceTimeLogService
{
	@Autowired
	private ResourceTimeLogMapper resourceTimeLogMapper;

	/**
     * 查询设备运行记录信息
     * 
     * @param handle 设备运行记录ID
     * @return 设备运行记录信息
     */
    @Override
	public ResourceTimeLog selectResourceTimeLogById(String handle)
	{
	    return resourceTimeLogMapper.selectResourceTimeLogById(handle);
	}
	
	/**
     * 查询设备运行记录列表
     * 
     * @param resourceTimeLog 设备运行记录信息
     * @return 设备运行记录集合
     */
	@Override
	public List<ResourceTimeLog> selectResourceTimeLogList(ResourceTimeLog resourceTimeLog)
	{
	    return resourceTimeLogMapper.selectResourceTimeLogList(resourceTimeLog);
	}
	
    /**
     * 新增设备运行记录
     * 
     * @param resourceTimeLog 设备运行记录信息
     * @return 结果
     */
	@Override
	public int insertResourceTimeLog(ResourceTimeLog resourceTimeLog)
	{
	    return resourceTimeLogMapper.insertResourceTimeLog(resourceTimeLog);
	}
	
	/**
     * 修改设备运行记录
     * 
     * @param resourceTimeLog 设备运行记录信息
     * @return 结果
     */
	@Override
	public int updateResourceTimeLog(ResourceTimeLog resourceTimeLog)
	{
	    return resourceTimeLogMapper.updateResourceTimeLog(resourceTimeLog);
	}

	/**
     * 删除设备运行记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteResourceTimeLogByIds(String ids)
	{
		return resourceTimeLogMapper.deleteResourceTimeLogByIds(ids.split(","));
	}
	
}
